feat(BA-6891): add kernel scheduling-history v2 DTOs and service actions#12869
Merged
Conversation
This was referenced Jul 15, 2026
Merged
jopemachine
force-pushed
the
feat/BA-6890-kernel-history-repository-scope
branch
from
July 15, 2026 09:40
497c88e to
f9eff31
Compare
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
from
July 15, 2026 09:40
db1b59b to
6d7ebbc
Compare
jopemachine
force-pushed
the
feat/BA-6890-kernel-history-repository-scope
branch
from
July 15, 2026 09:56
f9eff31 to
3cda92e
Compare
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
from
July 15, 2026 09:56
6d7ebbc to
e8ce7ad
Compare
jopemachine
force-pushed
the
feat/BA-6890-kernel-history-repository-scope
branch
from
July 15, 2026 10:17
3cda92e to
d384322
Compare
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
from
July 15, 2026 10:17
e8ce7ad to
b8a7aaa
Compare
jopemachine
force-pushed
the
feat/BA-6890-kernel-history-repository-scope
branch
from
July 20, 2026 03:19
d384322 to
05a2d77
Compare
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
from
July 20, 2026 04:10
b8a7aaa to
01a65ec
Compare
jopemachine
force-pushed
the
feat/BA-6890-kernel-history-repository-scope
branch
from
July 20, 2026 04:22
05a2d77 to
d7b27fc
Compare
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
from
July 20, 2026 04:22
01a65ec to
e23c1a9
Compare
3 tasks
jopemachine
force-pushed
the
feat/BA-6890-kernel-history-repository-scope
branch
from
July 20, 2026 04:41
d7b27fc to
7b9fa27
Compare
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
from
July 20, 2026 04:41
e23c1a9 to
320012c
Compare
jopemachine
force-pushed
the
feat/BA-6890-kernel-history-repository-scope
branch
2 times, most recently
from
July 20, 2026 04:47
8332a48 to
c04a047
Compare
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
from
July 20, 2026 04:47
320012c to
564c862
Compare
Base automatically changed from
feat/BA-6890-kernel-history-repository-scope
to
main
July 20, 2026 04:52
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
2 times, most recently
from
July 20, 2026 05:05
c3289f0 to
8d1124c
Compare
jopemachine
marked this pull request as ready for review
July 20, 2026 05:07
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
2 times, most recently
from
July 20, 2026 06:16
217d6c3 to
ac0ef89
Compare
jopemachine
marked this pull request as ready for review
July 20, 2026 06:23
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
2 times, most recently
from
July 20, 2026 06:59
d347c7a to
a4f9d28
Compare
6 tasks
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
3 times, most recently
from
July 20, 2026 08:26
1b11978 to
ae6f600
Compare
The admin search is system-wide and unscoped, so its authorization is the SUPERADMIN role gate rather than RBAC scope resolution: it is a BaseGlobalAction run through GlobalActionProcessor, which applies the gate on the action path behind the route's superadmin_required middleware. The scoped counterpart resolves against an RBAC scope and stays on the plain action path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
from
July 20, 2026 08:41
ae6f600 to
0b3351f
Compare
Co-authored-by: octodog <mu001@lablup.com>
jopemachine
force-pushed
the
feat/BA-6891-kernel-history-dto-service
branch
from
July 20, 2026 08:50
23b6dbd to
140c902
Compare
HyeockJinKim
approved these changes
Jul 21, 2026
2 tasks
fregataa
pushed a commit
that referenced
this pull request
Jul 21, 2026
PRs #12818 (b988f01b17a1) and #12869 (a1c4e7b93f22) each branched a migration off 3f9a1c7b2e04 and merged independently, leaving two alembic heads and failing scripts/check-multiple-alembic-heads.py. Per the alembic README (keep a single linear head; never merge), reparent the later-merged a1c4e7b93f22 (kernel history perms) onto the earlier b988f01b17a1 (fair-share uniqueness). The two migrations are independent, so ordering is safe. Chain is now: 3f9a1c7b2e04 -> b988f01b17a1 -> a1c4e7b93f22 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 21, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📚 Stacked PRs
BA-6887fix: kernel history conditions reference the real status columns ✅BA-6889models: kernel query conditions and orders ✅BA-6890repository: kernel search scope and scoped search ✅BA-6891DTO + service: kernel v2 DTOs and search actions ← you are hereBA-6892adapter + REST v2: kernel endpointsBA-6893SDK + CLI: kernel commandsMerge in order, bottom-up. Each PR is based on the one above it, so its diff shows only its own layer.
What
The v2 DTOs and the service layer for kernel scheduling history.
Review notes
The admin search is a global action. It is system-wide and unscoped, so its authorization is a SUPERADMIN role gate rather than RBAC scope resolution — which is what
BaseGlobalAction/GlobalActionProcessormodel. The processor applies the gate on the action path, behind the route'ssuperadmin_requiredmiddleware. The scoped counterpart resolves against an RBAC scope and stays on the plain action path.This makes
search_kernel_historythe only one of the four admin history searches on the global path; session/deployment/route predateGlobalActionProcessorand are untouched here. Converting them is a separate change — 44 REST v2 domains usesuperadmin_requiredand onlyretention_policyhas adopted the new processor so far.The DTOs are shared with GraphQL. Per
common/dto/manager/v2/AGENTS.mdthese are the single source of truth for REST v2 and the Strawberry schema, so BA-6883 builds its GraphQL types on these rather than defining its own. That is why the scope's non-emptiness rule lives inKernelHistoryScopeDTO.model_validator— one rule, both surfaces, rather than restated per surface.KernelHistoryNodehas nosub_steps, deliberately.kernel_scheduling_historydefines no such column — the84b901f69d16migration addedsub_stepsto the deployment and route tables only. Worth flagging: BEP-1061 (§2.3) and BA-6852 both describe kernel history as carryingsub_steps, which does not match the schema. That discrepancy belongs to the writer side (BA-6852) and is left alone here.Only the two inputs that get wired are added. There is no offset-only
SearchKernelHistoryInputmirroringSearchSessionHistoryInput— that one has no callers, and mirroring it would add dead code.The service methods are thin passthroughs, consistent with the existing ones.
SearchKernelScopedHistoryActionis a plain@dataclass, notfrozen=True: the sharedSchedulingHistoryActionbase is non-frozen, so a frozen subclass is aTypeError. (services/AGENTS.mdasks for frozen; the base and all six existing siblings already diverge. Out of scope here.)The adapter that converts these DTOs and drives the processors is #12870.
🤖 Generated with Claude Code
📚 Documentation preview 📚: https://sorna--12869.org.readthedocs.build/en/12869/
📚 Documentation preview 📚: https://sorna-ko--12869.org.readthedocs.build/ko/12869/